import Vue from "vue";
import VueI18n from "vue-i18n";

import langZh from "./zh.js"
import langEn from "./en.js"

Vue.use(VueI18n);

const messages = {
  zh: {
    // 中文包
    ...langZh
  },
  en: {
    // 英文包
    ...langEn
  },
};

const i18n = new VueI18n({
  locale: localStorage.getItem('language') || "zh",
  messages,
});

export default i18n;
